deploy: Avoid trying to change immutable state unnecessarily
authorColin Walters <walters@verbum.org>
Fri, 14 Feb 2020 16:35:50 +0000 (16:35 +0000)
committerColin Walters <walters@verbum.org>
Fri, 14 Feb 2020 16:37:38 +0000 (16:37 +0000)
commit0dd8dec2c996f4b16884f03c9de304dde9eac105
tree984766d8f2d03d7a3c213223c1324c9b06c8068f
parent7b28d01cd54c2c6b07fb3a734944f0b479c95793
deploy: Avoid trying to change immutable state unnecessarily

For some reason I haven't fully debugged (probably a recent
kernel change), in the case where the immutable bit isn't set,
trying to call `EXT2_IOC_SETFLAGS` without it set returns `EINVAL`.

Let's avoid calling the `ioctl()` if we don't have anything to do.

This fixes a slew of `make check` failures here in my toolbox
environment.

(kernel is `5.5.0-0.rc6.git0.1.fc32.x86_64` with `xfs`)
src/libostree/ostree-linuxfsutil.c